﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace orderCreater
{
    public partial class AddressList : Form
    {
        private AreaRang _areaRang = new AreaRang();
        public OrderCreaterModel OCM = new OrderCreaterModel(ConfigurationManager.AppSettings["ConnStr-531"]);
        public AddressList()
        {
            InitializeComponent();
        }

        private void AddressList_Load(object sender, EventArgs e)
        {
            sr_tb_logs.Text = "自产地市剩余地址数\r\n";
            foreach (var city in AddressRang.SendRang)
            {
                if (city.cityId == null) continue;
                this._areaRang.SendRang = city.areaList; //
                sr_tb_logs.AppendText(city.cityName + ":" + OCM.Get_AddrCount("3", "0", this._areaRang.getSendRangStr()).data + "\r\n");
            }

        }
    }
}
